package com.qf.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.entity.Consultationrf;
import com.qf.service.doctorconsultations.ConsultationrfService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.qf.util.R;

import java.util.List;

/**
 * (Consultationrf)表控制层
 *
 * @author makejava
 * @since 2024-12-03 18:18:19
 */
@RestController
@RequestMapping("/consultationrf")
public class ConsultationrfController {
    /**
     * 服务对象
     */
    @Autowired
    private ConsultationrfService consultationrfService;

    /**
     * 分页查询
     *
     */
    @GetMapping("/list")
    public R queryByPage(Consultationrf consultationrf) {

        PageHelper.startPage(consultationrf.getPageNum(), consultationrf.getPageSize());

        List<Consultationrf> list = consultationrfService.list(consultationrf);

        PageInfo<Consultationrf> pageInfo = new PageInfo<>(list);

        return R.ok(pageInfo);
    }

}

